package com.zy.algorithm.v3.sort;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;

import com.zy.activity.BaseFragment;
import com.zy.algorithm.v3.R;
import com.zy.utils.data.Point;
import com.zy.view.sort.DIYSortView;


public class MergeSortFragment extends BaseFragment {

    @Override
    protected int getLayout() {
        return R.layout.fragment_sort_merge;
    }

    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        DIYSortView diy_v4 = view.findViewById(R.id.sort_view);
        int[] array = new int[]{
                16, 15, 8, 2, 11, 6, 3, 10, 5, 7, 1, 13, 12, 4, 9, 14
        };
        diy_v4.setD(100);
        diy_v4.create(4, 1, array, Point.Type.DEFAULT);
    }
}
